import Login from '@/views/account/Login.vue'
import Lost from '@/views/lost/Index.vue'
import BasicLayout from '@/components/Layout/BasicLayout.vue'
import consultRoutes from '@/router/mainRoutes/consult.js'
import queueRoutes from '@/router/mainRoutes/queue.js'
import orderRoutes from '@/router/mainRoutes/order.js'
import memberRoutes from '@/router/mainRoutes/member.js'
import productRoutes from '@/router/mainRoutes/product.js'
import onorderRoutes from '@/router/mainRoutes/onorder.js'
import wineRoutes from '@/router/mainRoutes/wine.js'
import cashierRoutes from '@/router/mainRoutes/cashier.js'
import wineManageRoutes from '@/router/mainRoutes/wineManage.js'
import shiftsDutyRoutes from '@/router/mainRoutes/shiftsDuty.js'
import shiftsRecordRoutes from '@/router/mainRoutes/shiftsRecord.js'
import SummaryRoutes from '@/router/mainRoutes/Summary.js'



import emptyRouter from '@/router/mainRoutes/empty.js'


import OrderTable from '@/views/workbench/order/orderTable/Index.vue'
import orderDishes from '@/views/workbench/orderDishes/index/Index.vue'
import lossOrder from '@/views/workbench/lossOrder/index/Index.vue'
import replaceDishes from '@/views/workbench/replaceDishes/index/Index.vue'
import OrderPay from '@/views/workbench/order/pay/pay.vue'
import ReturnFood from '@/views/workbench/order/returnFood/Index.vue'
import OrderRecords from '@/views/workbench/order/orderRecords/Index.vue'
import ClearRecords from '@/views/workbench/order/clearRecords/Index.vue'
import SplitOrder from '@/views/workbench/order/splitOrder/Index.vue'
import orderPayment from '@/views/workbench/order/pay/payment/index.vue'
import onorderPay from '@/views/workbench/onorder/pay.vue'
import ReturnRecord from '@/views/workbench/cashier/report/returnRecord.vue'
import refund from '@/views/workbench/refund/index/Index.vue'
import replaceLoss from '@/views/workbench/lossOrder/replaceDishes/index.vue'
import Allque from '@/views/workbench/allque/index/Index.vue'



//动态路由配置表
export const MainRoutes = [
    ...consultRoutes,
    ...queueRoutes,
    ...orderRoutes,
    ...memberRoutes,
    ...productRoutes,
    ...onorderRoutes,
    ...wineRoutes,
    ...cashierRoutes,
    ...wineManageRoutes,
    ...shiftsDutyRoutes,
    ...shiftsRecordRoutes,
    ...SummaryRoutes,
    ...emptyRouter
]

//系统路由
export const SystemRoutes = [
    // 登录
    {
        path: '/login',
        name: 'Login',
        component: Login,
        meta: {
            title: '登录'
        }
    },
    // 首页（工作台）
    {
        path: '/',
        component: BasicLayout,
        // redirect: '/consult',// 还不一定有你的权限 首页不一定是你
        children: MainRoutes
    },
	//页面丢失
    {
        path: '/404',
        name: '404',
        component: Lost,
        meta: {
            title: '404'
        }
    },
	// 重定向跳转404
    {
        path: "/:pathMatch(.*)*",
        component: Lost,
    },
    // 点单桌台
    {
        path: '/order/orderTable',
        name: 'orderTable',
        component: OrderTable,
        meta: {
            title: '点单桌台详情',
        },
        children: []
    },
    //点单页面
    {
        path: '/orderDishes',
        name: 'orderDishes',
        component: orderDishes,
        meta: {
            title: '点单',
        }
    },
    //损赔页面
    {
        path: '/lossOrder',
        name: 'lossOrder',
        component: lossOrder,
        meta: {
            title: '损赔',
        }
    },
    //损赔换菜页面
    {
        path: '/replaceLoss',
        name: 'replaceLoss',
        component: replaceLoss,
        meta: {
            title: '损赔换菜',
        }
    },
    //换菜页面
    {
        path: '/replaceDishes',
        name: 'replaceDishes',
        component: replaceDishes,
        meta: {
            title: '换菜',
        }
    },
    // 点单桌台
    {
        path: '/order/pay',
        name: 'orderPay',
        component: OrderPay,
        meta: {
            title: '结账',
        },
        children: []
    },
    // 操作记录 
    {
        path: '/order/orderRecords',
        name: 'orderRecords',
        component: OrderRecords,
        meta: {
            title: '操作记录',
        },
        children: []
    },
    // 清台记录
    {
        path: '/order/clearRecords',
        name: 'clearRecords',
        component: ClearRecords,
        meta: {
            title: '清台记录',
        },
        children: []
    },
    // 退菜
    {
        path: '/order/returnFood',
        name: 'returnFood',
        component: ReturnFood,
        meta: {
            title: '退菜',
        },
        children: []
    },
    // 分单
    {
        path: '/order/splitOrder',
        name: 'splitOrder',
        component: SplitOrder,
        meta: {
            title: '分单',
        },
        children: []
    },
  
    // 收款
    {
        path: '/order/payment',
        name: 'orderPayment',
        component: orderPayment,
        meta: {
            title: '收款',
        },
        children: []
    },
    // 网上支付查询
    {
        path: '/onorder/pay',
        name: 'onorderPay',
        component: onorderPay,
        meta: {
            title: '网上支付查询',
        },
        children: []
    },
    // 还款记录
    {
        path: '/cashier/returnRecord',
        name: 'cashierReturnRecord',
        component: ReturnRecord,
        meta: {
            title: '还款记录',
        },
        children: []
    },
    //退款
    {
        path: '/refund',
        name: 'refund',
        component: refund,
        meta: {
            title: '退款',
        }
    },
    //排队全屏
    {
        path: '/allque',
        name: 'allque',
        component: Allque,
        meta: {
            title: '排队',
        }
    }
]
